package com.retail.marketing.common.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.retail.common.core.annotation.Excel;
import com.retail.common.core.web.domain.BaseEntity;

/**
 * 优惠券管理对象 t_coupon
 *
 * @author retail
 * @date 2024-02-27
 */
public class TCoupon extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 优惠券ID */
    private Integer couponId;

    /** 名称 */
    @Excel(name = "名称")
    private String couponName;

    /** 码 */
    @Excel(name = "码")
    private String couponCode;

    /** 类型 */
    @Excel(name = "类型")
    private Integer couponTypeId;

    /** 满减金额 */
    @Excel(name = "满减金额")
    private BigDecimal discountAmount;

    /** 折扣百分比(折扣类型) */
    @Excel(name = "折扣百分比(折扣类型)")
    private BigDecimal discountPerentage;

    /** 所需最低金额(满减类型) */
    @Excel(name = "所需最低金额(满减类型)")
    private BigDecimal minOrderAmount;

    /** 过期日期 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expirationDate;

    /** 状态 */
    @Excel(name = "状态")
    private Integer status;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updateAt;

    /** 优惠券图片 */
    @Excel(name = "优惠券图片")
    private String couponUrl;
    private List<TCouponType> TCouponTypeList;

    public void setCouponId(Integer couponId)
    {
        this.couponId = couponId;
    }

    public Integer getCouponId()
    {
        return couponId;
    }
    public void setCouponName(String couponName)
    {
        this.couponName = couponName;
    }

    public String getCouponName()
    {
        return couponName;
    }
    public void setCouponCode(String couponCode)
    {
        this.couponCode = couponCode;
    }

    public String getCouponCode()
    {
        return couponCode;
    }
    public void setCouponTypeId(Integer couponTypeId)
    {
        this.couponTypeId = couponTypeId;
    }

    public Integer getCouponTypeId()
    {
        return couponTypeId;
    }
    public void setDiscountAmount(BigDecimal discountAmount)
    {
        this.discountAmount = discountAmount;
    }

    public BigDecimal getDiscountAmount()
    {
        return discountAmount;
    }
    public void setDiscountPerentage(BigDecimal discountPerentage)
    {
        this.discountPerentage = discountPerentage;
    }

    public BigDecimal getDiscountPerentage()
    {
        return discountPerentage;
    }
    public void setMinOrderAmount(BigDecimal minOrderAmount)
    {
        this.minOrderAmount = minOrderAmount;
    }

    public BigDecimal getMinOrderAmount()
    {
        return minOrderAmount;
    }
    public void setExpirationDate(Date expirationDate)
    {
        this.expirationDate = expirationDate;
    }

    public Date getExpirationDate()
    {
        return expirationDate;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }
    public void setCreatedAt(Date createdAt)
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt()
    {
        return createdAt;
    }
    public void setUpdateAt(Date updateAt)
    {
        this.updateAt = updateAt;
    }

    public Date getUpdateAt()
    {
        return updateAt;
    }
    public void setCouponUrl(String couponUrl)
    {
        this.couponUrl = couponUrl;
    }

    public String getCouponUrl()
    {
        return couponUrl;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("couponId", getCouponId())
            .append("couponName", getCouponName())
            .append("couponCode", getCouponCode())
            .append("couponTypeId", getCouponTypeId())
            .append("discountAmount", getDiscountAmount())
            .append("discountPerentage", getDiscountPerentage())
            .append("minOrderAmount", getMinOrderAmount())
            .append("expirationDate", getExpirationDate())
            .append("status", getStatus())
            .append("createdAt", getCreatedAt())
            .append("updateAt", getUpdateAt())
            .append("couponUrl", getCouponUrl())
            .toString();
    }

    public List<TCouponType> getTCouponTypeList() {
        return TCouponTypeList;
    }

    public void setTCouponTypeList(List<TCouponType> tCouponTypeList) {
        this.TCouponTypeList = tCouponTypeList;
    }
}
